
<script>
export default {
  data () {
    return {}
  },
  name: 'renders',
  // render: function(createElement) {
  //   console.log(123456)
  //   // var self = this;
  //   // return createElement('div', '文本');//使用字符串生成文本节点
  //   return createElement('div', [//由createElement函数构建而成的数组
  //     createElement('h1', '主标'),//createElement函数返回VNode对象
  //     createElement('h2', '副标')
  //   ]);
  // },
  render (createElement) {
    console.log(this.$slots.default)
    console.log(this.$slots.header)
    var header = this.$slots.header
    var body = this.$slots.default
    var footer = this.$slots.footer
    return createElement(
      'div',
      [
        createElement('header', header),
        createElement('div', body),
        createElement('footer', footer)
      ]
    )
  },
  methods: {
  },
  props: {
    level: {
      type: Number,
      required: true
    }
  },
  mounted () {
    console.log(this.$parent.msg)
    console.log(this.$root)
    console.log(this.$props)
  }
}
</script>
